iT邦幫忙

0

第36天~就是自己KEY

Tzu 2022-02-08 00:24:27890 瀏覽
  • 分享至 

  • xImage
  •  

這篇的上一篇:https://ithelp.ithome.com.tw/articles/10283913

第36天~就是自己KEY

https://ithelp.ithome.com.tw/upload/images/20220208/201190354xq5JjDTSc.png

刪除的語法:

delete from[dbo].[學生]
where [學號]=2

https://ithelp.ithome.com.tw/upload/images/20220208/20119035ege0YYvYc9.png

更新的語法:

UPDATE "表格"
SET "欄位1" = [值1], "欄位2" = [值2]
WHERE "條件";


UPDATE [dbo].[學生]
SET [生日] ='1988/2/1'
WHERE [生日] = '1988/2/2'

要記得加入"單引號"就是' '(要自己打)

https://ithelp.ithome.com.tw/upload/images/20220208/20119035BmxXIg11DL.png

查看資料表-

https://ithelp.ithome.com.tw/upload/images/20220208/201190357gU71zUgv4.png


用指令表-新增資料表的方法-

https://ithelp.ithome.com.tw/upload/images/20220208/20119035VE9wsIXuST.png

出來長這樣-

https://ithelp.ithome.com.tw/upload/images/20220208/20119035YeFOqFQMyo.png

要新增資料表-

https://ithelp.ithome.com.tw/upload/images/20220208/20119035BCUF8brmhW.png

按"執行"
https://ithelp.ithome.com.tw/upload/images/20220208/20119035z9RNATIVQm.png

旁邊重新整理可以看到-
https://ithelp.ithome.com.tw/upload/images/20220208/20119035NZda2xjLAY.png


刪除資料表 方法-

https://ithelp.ithome.com.tw/upload/images/20220208/20119035nXu7PpaKrq.png

畫面長這樣-

https://ithelp.ithome.com.tw/upload/images/20220208/20119035HhFWQ0SLyE.png

然後按"執行"

https://ithelp.ithome.com.tw/upload/images/20220208/201190358FNFIr6qsF.png

重新整理
https://ithelp.ithome.com.tw/upload/images/20220208/20119035N9TY4LUF3D.png

註解:
-- =>單列
/*區塊 */ =>整段

註解只有有選住,然後按"執行"也是可以跑


設定為"主鍵"

按右鍵-設計-

https://ithelp.ithome.com.tw/upload/images/20220208/20119035PkCdBLhmpI.png

現在長這樣-

https://ithelp.ithome.com.tw/upload/images/20220208/20119035MrdOzsBxeZ.png

要選定一整列 再按
https://ithelp.ithome.com.tw/upload/images/20220208/20119035MBRZCWyxDL.png

現在長這樣(如果裡面的資料有重複會報錯)

https://ithelp.ithome.com.tw/upload/images/20220208/201190350buhrqjBEk.png

居然出現不允許設定為PK

https://ithelp.ithome.com.tw/upload/images/20220208/20119035OHyd1zyKSZ.png

我再回來改~讓我抓抓 BUG

/images/emoticon/emoticon02.gif

https://ithelp.ithome.com.tw/upload/images/20220208/20119035p6jLrh7IeZ.png

後來發現是設計師-這裡V要取消-KEY才能做~(預設是鎖起來)

https://ithelp.ithome.com.tw/upload/images/20220208/20119035T6YZY02Ctk.png

這篇的下一篇:https://ithelp.ithome.com.tw/articles/10283918


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言